package com.hy.service.impl;

import com.hy.bean.Deptfunds;
import com.hy.dao.impl.DeptfundsDaoImpl;
import com.hy.service.DeptfundsService;
import com.hy.dao.DeptfundsDao;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
* @author 冯俊杰
* @description 针对表【DEPTFUNDS】的数据库操作Service实现
* @createDate 2024-05-08 08:55:05
*/
@Service
public class DeptfundsServiceImpl implements DeptfundsService{
    private DeptfundsDao dao = new DeptfundsDaoImpl();

    @Override
    public List<Map<String, Object>> queryAll(String deptName) throws Exception {

        if (deptName == null)
            deptName = "";

        return dao.selectAll(deptName);
    }

    @Override
    public List<Map<String, Object>> selectDeptAll(Integer deptId) throws Exception {

        return dao.selectDeptAll(deptId);
    }

    @Override
    public Boolean updateDeptBalanceAdd(int deptId, Double balance) throws Exception {
        return dao.updateDeptBalanceAdd(deptId, balance);
    }

    @Override
    public boolean deleteById(int id) throws Exception {
        return dao.deleteById(id);
    }
}




